<div class="small box">
<h2 style="font-size: 16px">Documenti</h2>
<ul class="menublock">
  <li><a href="#" style="font-size: 11px">Gestisci</a>
    <ul>
	  <li><a href="student_works.php" style="font-size: 11px">Lavori alunni</a></li>
      <li><a href="doc_progetto.php" style="font-size: 11px">Progetti</a></li>
      <li><a href="doc_didattici.php" style="font-size: 11px">Didattica</a></li>
	</ul></li>
  <li><a href="#" style="font-size: 11px">Vedi</a>
  	<ul>
	  <li><a href="lavori_studenti.php" style="font-size: 11px">Lavori alunni</a></li>
<?php 
/*
 * scarico le tipologie di documento presenti
 */
$sel_type = "SELECT * FROM document_types WHERE id <> 1 AND id <> 7 ORDER BY id";
$res_type = $db->execute($sel_type);
while($doc = $res_type->fetch_assoc()){
	if($doc['id'] == 2) 
		$commento = substr($doc['commento'], 0, 19); 
	else if($doc['id'] == 5) 
		$commento = substr($doc['commento'], 0, 15);
	else
		$commento = $doc['commento'];
?>
      <li><a href="documenti.php?tipo=<?php print $doc['id'] ?>" style="font-size: 11px"><?php print $commento ?></a></li>
<?php } ?>
	</ul></li>
 
</ul>
</div>